package com.zlzlib.common.util;


/**
 * @DateTime: 2023/2/24 8:40
 * @Author zlz
 * @Version 1.0
 */
public class MyUtil {

    /**
     * 匹配日期格式：yyyy-MM-dd
     */
    public static final String PATTERN_DATE_YYYY_MM_DD = "(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|" +
            "((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|" +
            "((0[48]|[2468][048]|[3579][26])00))-02-29)$";

    /**
     * ip匹配格式
     */
    public static final String PATTERN_IP = "^([1-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])){3}$";
    /**
     * 匹配只包含字母数字特殊符号
     */
    public static final String PATTERN_NUMBER_LETTERS_SYMBOL = "^[\\p{Alnum}!@#$%^&*]*$";
    /**
     * 匹配只包含字母数字
     */
    public static final String PATTERN_NUMBER_LETTERS = "^[\\p{Alnum}]*$";
    /**
     * 匹配必须包含数字，大写或小写字母和特殊字符!@#$%^&*  长度必须大于4
     */
    public static final String PATTERN_INCLUDE_NUMBER_LETTERS_SYMBOL =
            "^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[!@#$%^&*])[\\p{Graph}]{4,}$";



}
